package com.doit.day03;

import java.util.Iterator;

public class IterableDemo implements Iterable<Hero>{

    @Override
    public Iterator<Hero> iterator() {
        HeroIterator heroIterator = null;
        try {
            heroIterator = new HeroIterator();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return heroIterator;
    }
}
